var app = angular.module("myApp");
app.directive("menu",function(){
   return {
       restrict:"E",
       replace:true,
       templateUrl:"directives/menu/menu.html",
        link:function(scope, element, attrs){
            console.log(scope);
            console.log(element);
            console.log(attrs);
            scope.data=JSON.parse(attrs.data);
            console.log(scope.data);
       },
       compile: function(element, attributes) {
           return {
               pre: function preLink(scope, element, attributes) {
                   scope.data = JSON.parse(attributes.data);
               },
               post: function postLink(scope, element, attributes) {
                   // scope.number = scope.number + "55555 ";
               }
           };
       }
   }


})